#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int n,i,j,k=1,z,h=2;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        for(j=1;j<=abs(n/2+1-i);j++)printf(" ");
        printf("%d",k<=(n/2+1)?k++:(n-i+1));
        for(z=0;z<=2*(n/2)-2*abs(n/2+1-i)-2;z++)printf(" ");
        if(i>=2&&i<n){printf("%d",h<=(n/2+1)?h++:(n-i+1));}
        printf("\n");
    }
    return 0;
}
